//
//  QSOfficeFileCellTableViewCell.m
//  DigitalEconomy_iOS
//
//  Created by Ding on 2020/5/20.
//  Copyright © 2020 DingC. All rights reserved.
//

#import "QSOfficeFileCellTableViewCell.h"

@implementation QSOfficeFileCellTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setFileModel:(QSWorkStationFileModel *)fileModel{
    
    if (fileModel.ewFileChoose.integerValue == 1) {
        //1附件上传
        [self.fileImageView sd_setImageWithURL:[NSURL URLWithString:fileModel.ewFilePhoto]];
        
    }else{
        //链接上传
        [self.fileImageView sd_setImageWithURL:[NSURL URLWithString:fileModel.ewFilePhoto]];
    }
    if ([fileModel.ewFileType isEqualToString:@"pdf"]) {
        [self.fileImageView setImage:[UIImage imageNamed:@"ic_pdf"]];
    }
    if ([fileModel.ewFileType isEqualToString:@"excel"]) {
        [self.fileImageView setImage:[UIImage imageNamed:@"ic_excel"]];
    }
    if ([fileModel.ewFileType isEqualToString:@"word"]) {
        [self.fileImageView setImage:[UIImage imageNamed:@"ic_word"]];
    }
    if ([fileModel.ewFileType isEqualToString:@"txt"]) {
        [self.fileImageView setImage:[UIImage imageNamed:@"ic_txt"]];
    }
//    if (fileModel.ewFilePhoto) {
//        [self.fileImageView sd_setImageWithURL:[NSURL URLWithString:fileModel.ewFilePhoto]];
//    }
    self.fileNameLabel.text = fileModel.ewFileName;

}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
